{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 作业"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "随机数生成六个班的考试成绩，3门考试：Python、数学、语文。每个班50人"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "collapsed": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[[ 61, 107,  70],\n",
       "        [124, 125,  71],\n",
       "        [ 25, 107,  58],\n",
       "        [ 51,  71,  71],\n",
       "        [ 22, 117,  88],\n",
       "        [ 89, 106, 111],\n",
       "        [ 59,  69,  47],\n",
       "        [ 90,  56,  83],\n",
       "        [110,  85, 117],\n",
       "        [ 36,   3,  74],\n",
       "        [ 16,  48, 129],\n",
       "        [ 44,   1, 124],\n",
       "        [  1, 118,  16],\n",
       "        [ 30, 113,  44],\n",
       "        [ 95,  48, 106],\n",
       "        [ 82, 147, 135],\n",
       "        [ 76, 126,  22],\n",
       "        [101,  57,  60],\n",
       "        [ 80, 139,  27],\n",
       "        [ 86,  56, 150],\n",
       "        [ 53,  48,  46],\n",
       "        [150, 109, 142],\n",
       "        [137,  26,  78],\n",
       "        [ 60,  67,  57],\n",
       "        [116,  48, 149],\n",
       "        [ 20,  47,  60],\n",
       "        [ 41,   0, 145],\n",
       "        [118,  94,  98],\n",
       "        [ 14, 134,   5],\n",
       "        [108, 103, 142],\n",
       "        [  7,   3,  60],\n",
       "        [ 99, 102,  50],\n",
       "        [ 63, 113,  59],\n",
       "        [110,  61,  13],\n",
       "        [ 30, 121,  86],\n",
       "        [ 34, 137,  90],\n",
       "        [ 96,  17, 138],\n",
       "        [ 45,  11,  39],\n",
       "        [119,   0,  18],\n",
       "        [128,  56,  29],\n",
       "        [ 61, 150,  92],\n",
       "        [134,  82,  61],\n",
       "        [119,  84,  46],\n",
       "        [111,  82,  45],\n",
       "        [100,  65, 109],\n",
       "        [103,  66,   9],\n",
       "        [ 63,  11,  68],\n",
       "        [146, 109,  91],\n",
       "        [129,  18,  47],\n",
       "        [ 53,  12, 111]],\n",
       "\n",
       "       [[115,  94,  44],\n",
       "        [ 91,  17,  83],\n",
       "        [ 53, 146,  52],\n",
       "        [125,  24, 134],\n",
       "        [ 84, 131,   9],\n",
       "        [ 10,   1,  51],\n",
       "        [132,  57,  81],\n",
       "        [ 47,  63,  91],\n",
       "        [149, 115, 144],\n",
       "        [ 66,  56, 112],\n",
       "        [ 57,   0,  65],\n",
       "        [ 13,  80,  42],\n",
       "        [ 84,  77,  40],\n",
       "        [ 96, 116, 147],\n",
       "        [119,  83, 130],\n",
       "        [ 21, 105,  16],\n",
       "        [ 62,  61,  99],\n",
       "        [ 65,  62,  30],\n",
       "        [130,  72, 112],\n",
       "        [ 21,  35,   6],\n",
       "        [147,  29,  16],\n",
       "        [  3,  38,  93],\n",
       "        [ 30, 127,  61],\n",
       "        [ 41,  79, 132],\n",
       "        [135, 120,  55],\n",
       "        [150,  18,  22],\n",
       "        [102, 133, 108],\n",
       "        [100,  80,  53],\n",
       "        [150,  76,  44],\n",
       "        [139,  42,  67],\n",
       "        [ 40, 128, 131],\n",
       "        [138, 121,  91],\n",
       "        [ 74, 111, 104],\n",
       "        [ 39,  71,  48],\n",
       "        [ 46, 142, 109],\n",
       "        [ 14,  95,  88],\n",
       "        [135,  38,  60],\n",
       "        [ 38, 126,  69],\n",
       "        [126,  27,  60],\n",
       "        [117,   3,  98],\n",
       "        [132, 107, 125],\n",
       "        [ 57,  55,  58],\n",
       "        [145, 131,   6],\n",
       "        [ 99, 115,  43],\n",
       "        [147,  56,  56],\n",
       "        [  9,  87, 110],\n",
       "        [ 29,  75,  89],\n",
       "        [ 44, 107,  68],\n",
       "        [ 48, 138,  18],\n",
       "        [147, 124,  18]],\n",
       "\n",
       "       [[ 29,  11,  17],\n",
       "        [138, 117, 123],\n",
       "        [106,  77, 121],\n",
       "        [  1,  60, 144],\n",
       "        [ 32, 118, 149],\n",
       "        [ 19,  67, 120],\n",
       "        [128, 104,  36],\n",
       "        [ 87,  56,  69],\n",
       "        [ 33,  48, 105],\n",
       "        [  4, 124,  14],\n",
       "        [146,  35,  65],\n",
       "        [  8,  51,   9],\n",
       "        [127,  62,  74],\n",
       "        [ 56,  46, 117],\n",
       "        [101,  48,  74],\n",
       "        [  0, 110,  78],\n",
       "        [ 54,  85,  94],\n",
       "        [ 45,  69,  36],\n",
       "        [100, 110,   4],\n",
       "        [ 79,  19,  58],\n",
       "        [146, 121,  92],\n",
       "        [145, 143,  89],\n",
       "        [  5,  41, 123],\n",
       "        [ 51,  30, 115],\n",
       "        [116,  46,  89],\n",
       "        [132,   6,  44],\n",
       "        [ 42,   2,  21],\n",
       "        [ 42,  69,  13],\n",
       "        [110,  78,  14],\n",
       "        [ 27, 130,  21],\n",
       "        [ 40,   7,  19],\n",
       "        [  7,  99,  13],\n",
       "        [142,  45,  47],\n",
       "        [  7, 104,  81],\n",
       "        [ 97, 128,  75],\n",
       "        [ 85,  65,  97],\n",
       "        [ 26,  71, 109],\n",
       "        [126, 137,   1],\n",
       "        [ 63,  82,  73],\n",
       "        [ 82, 135,  62],\n",
       "        [ 63,  72,  36],\n",
       "        [ 95,  95,  89],\n",
       "        [ 95,  11, 149],\n",
       "        [ 45,   8,  32],\n",
       "        [128, 110, 123],\n",
       "        [ 52,  44, 120],\n",
       "        [  6,  96,  94],\n",
       "        [ 15, 134,   4],\n",
       "        [121, 123,  85],\n",
       "        [120,  65,  19]],\n",
       "\n",
       "       [[ 74,  34,  72],\n",
       "        [ 35,  41,   6],\n",
       "        [ 32,  70,   4],\n",
       "        [119,  79,  40],\n",
       "        [ 76,  90, 113],\n",
       "        [ 90,  58, 137],\n",
       "        [ 60, 146,  17],\n",
       "        [123,  34,  98],\n",
       "        [ 60, 141,  45],\n",
       "        [ 84,  23, 104],\n",
       "        [143, 116, 112],\n",
       "        [141, 119, 106],\n",
       "        [126, 137,  71],\n",
       "        [ 68,  61,  53],\n",
       "        [ 66, 100,   1],\n",
       "        [107,  11, 120],\n",
       "        [ 11, 132,  22],\n",
       "        [ 38, 105,  39],\n",
       "        [ 95,  46, 105],\n",
       "        [ 83,  24, 142],\n",
       "        [  1, 147, 144],\n",
       "        [ 92,  31,  14],\n",
       "        [144,   1,  27],\n",
       "        [ 41,  57, 119],\n",
       "        [ 92,  24,  47],\n",
       "        [124,  36,  45],\n",
       "        [ 56,  48,  52],\n",
       "        [ 34,  84,  87],\n",
       "        [119,  46,   3],\n",
       "        [ 96, 104, 122],\n",
       "        [136,  27,  71],\n",
       "        [ 35, 133, 126],\n",
       "        [147,  83, 140],\n",
       "        [  0,  32,  64],\n",
       "        [117,  65, 109],\n",
       "        [  9, 150, 120],\n",
       "        [ 78, 101, 134],\n",
       "        [109, 114,  87],\n",
       "        [ 21,  33,   0],\n",
       "        [ 28, 117,  95],\n",
       "        [ 40,   0,  14],\n",
       "        [ 43,  62,  93],\n",
       "        [ 92,  36,  40],\n",
       "        [ 75,  13, 102],\n",
       "        [ 52,  29, 128],\n",
       "        [141,  82,  42],\n",
       "        [ 70,  20, 148],\n",
       "        [ 64, 121,   1],\n",
       "        [ 94, 115, 144],\n",
       "        [118,  12, 148]],\n",
       "\n",
       "       [[ 58,  82,  85],\n",
       "        [ 25,  29,  42],\n",
       "        [ 66,  65,  30],\n",
       "        [ 28,  41, 148],\n",
       "        [139, 102, 113],\n",
       "        [ 72,   3,  86],\n",
       "        [109, 109, 115],\n",
       "        [ 11,  75,  54],\n",
       "        [ 91,  97,  11],\n",
       "        [108, 117, 133],\n",
       "        [ 79, 123, 129],\n",
       "        [ 54,  45, 147],\n",
       "        [141,   1, 132],\n",
       "        [ 55,  17,  73],\n",
       "        [ 59, 121,  78],\n",
       "        [127,  92,  83],\n",
       "        [ 32,  29, 112],\n",
       "        [ 31,  31, 141],\n",
       "        [ 17,  25,  11],\n",
       "        [ 87, 101,  41],\n",
       "        [ 45, 103, 149],\n",
       "        [145,  51, 132],\n",
       "        [132, 125,  26],\n",
       "        [101,  81,   4],\n",
       "        [ 27,  40, 120],\n",
       "        [  4,  28, 114],\n",
       "        [ 82,  72, 133],\n",
       "        [  0,  75, 126],\n",
       "        [ 89,  96, 104],\n",
       "        [ 83,  79,  15],\n",
       "        [ 43,  22,  44],\n",
       "        [138,  41,  70],\n",
       "        [ 53, 143,  12],\n",
       "        [120, 114,   1],\n",
       "        [113,  95,  48],\n",
       "        [ 21, 150,  77],\n",
       "        [ 95, 110,  34],\n",
       "        [129,  53,  90],\n",
       "        [ 28, 122,  62],\n",
       "        [ 16,  54,  74],\n",
       "        [ 71, 132,  93],\n",
       "        [148,  94,  29],\n",
       "        [ 46,  41,  93],\n",
       "        [141,  20, 138],\n",
       "        [111, 104,  15],\n",
       "        [  3, 131,  85],\n",
       "        [  1,  51,  99],\n",
       "        [ 16,  64,  54],\n",
       "        [ 32, 150, 135],\n",
       "        [ 63,  56, 109]],\n",
       "\n",
       "       [[ 39,  21,  17],\n",
       "        [ 61, 136, 142],\n",
       "        [ 14,  47,   4],\n",
       "        [ 22,  15, 107],\n",
       "        [ 49,  27, 119],\n",
       "        [ 34,   4, 115],\n",
       "        [ 85, 144,  36],\n",
       "        [101,  36,  84],\n",
       "        [  8,  88,  42],\n",
       "        [121, 113,  72],\n",
       "        [ 37,  77, 137],\n",
       "        [124,  35,  34],\n",
       "        [ 16, 147,  47],\n",
       "        [ 97,  84,  76],\n",
       "        [ 55, 150,  10],\n",
       "        [113,   3,  73],\n",
       "        [ 63, 126,  21],\n",
       "        [ 39, 145,  98],\n",
       "        [ 49, 106,  32],\n",
       "        [  4,  42, 133],\n",
       "        [137, 112, 109],\n",
       "        [ 90, 132, 144],\n",
       "        [130, 102, 133],\n",
       "        [ 51,   8,  14],\n",
       "        [ 63,   8,  11],\n",
       "        [ 29,  93, 139],\n",
       "        [  1, 107,   8],\n",
       "        [117,  62,   7],\n",
       "        [ 99,  11, 120],\n",
       "        [127,  10,  42],\n",
       "        [142,  61, 129],\n",
       "        [  2,  50,  58],\n",
       "        [ 23,  31,  57],\n",
       "        [111,  26,  11],\n",
       "        [ 45,  29,  20],\n",
       "        [126,  99, 124],\n",
       "        [103,  44,  48],\n",
       "        [ 25,  55,  58],\n",
       "        [ 71,  71, 146],\n",
       "        [ 53,  14, 137],\n",
       "        [ 66,  90, 120],\n",
       "        [ 82,  65,  82],\n",
       "        [ 75,  29,  87],\n",
       "        [ 81, 106, 149],\n",
       "        [ 39, 127,  44],\n",
       "        [116, 141,  81],\n",
       "        [ 11,  67,  82],\n",
       "        [ 74, 108,  24],\n",
       "        [150,  59, 133],\n",
       "        [ 50, 119,  77]]])"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import numpy as np\n",
    "a = np.random.randint(0,151,size = (6,50,3))#Python、数学、语文\n",
    "a"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "将六个班的考试成绩进行合并得到score"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {
    "collapsed": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[143,   3,  74],\n",
       "       [ 93, 130, 112],\n",
       "       [138,  15,  83],\n",
       "       [132,   1,   0],\n",
       "       [141, 114,   5],\n",
       "       [ 62,  75,  54],\n",
       "       [133,  30,  21],\n",
       "       [ 90,  11,   5],\n",
       "       [109,  41,  76],\n",
       "       [ 28,   7,  79],\n",
       "       [ 15,  58,   6],\n",
       "       [ 62, 110,  11],\n",
       "       [114, 148,  87],\n",
       "       [ 82,  35,  32],\n",
       "       [  3,  78, 145],\n",
       "       [133, 122,   2],\n",
       "       [ 37,  82,  59],\n",
       "       [ 42,  93,   3],\n",
       "       [ 63, 114,  12],\n",
       "       [144,  19, 131],\n",
       "       [135,  98,   2],\n",
       "       [113,  31,  73],\n",
       "       [116,  31,  25],\n",
       "       [145, 134,  23],\n",
       "       [113,  20,  78],\n",
       "       [115,  51, 100],\n",
       "       [ 73,  63, 123],\n",
       "       [ 96,   2, 134],\n",
       "       [ 96,   9,  71],\n",
       "       [106, 120,  13],\n",
       "       [112, 100,  47],\n",
       "       [ 67, 137,  51],\n",
       "       [136,  36,  83],\n",
       "       [ 59,  13,   5],\n",
       "       [ 44,  71,  36],\n",
       "       [121,  77, 130],\n",
       "       [134,   7,  59],\n",
       "       [146,  23,  34],\n",
       "       [ 10,  37, 142],\n",
       "       [105,  80, 115],\n",
       "       [  7,  44,  49],\n",
       "       [ 99,  92,  52],\n",
       "       [  1,  10,  36],\n",
       "       [ 31,   8,  89],\n",
       "       [ 44,  43,  25],\n",
       "       [135,  87,  90],\n",
       "       [145,  71,  86],\n",
       "       [ 75, 102,  42],\n",
       "       [105,  15, 123],\n",
       "       [109,  67,  51],\n",
       "       [ 78, 135,   1],\n",
       "       [ 87,  74, 120],\n",
       "       [ 96,  17, 134],\n",
       "       [ 59,  97, 139],\n",
       "       [101, 142,  91],\n",
       "       [ 36,  18, 123],\n",
       "       [111,  87,  96],\n",
       "       [117,  68,  96],\n",
       "       [  6,   4, 147],\n",
       "       [136,   3, 132],\n",
       "       [ 58,  92, 121],\n",
       "       [ 71,  84,  43],\n",
       "       [ 24, 141, 125],\n",
       "       [125,  34,  81],\n",
       "       [ 69,  15,  18],\n",
       "       [ 75,  62,  91],\n",
       "       [ 33,  83, 114],\n",
       "       [ 98,  55,  49],\n",
       "       [ 21, 108,  62],\n",
       "       [122,  63,  34],\n",
       "       [116, 131,  64],\n",
       "       [ 32, 144,  64],\n",
       "       [  0, 150, 101],\n",
       "       [ 85, 138,  73],\n",
       "       [ 27,  84,   2],\n",
       "       [128,   3,  12],\n",
       "       [ 11,   3, 119],\n",
       "       [  0, 142,  12],\n",
       "       [ 75,  20,  14],\n",
       "       [144,  95,  29],\n",
       "       [ 25,  47,  76],\n",
       "       [ 23, 138,  19],\n",
       "       [124,  11, 106],\n",
       "       [ 58,  89,  13],\n",
       "       [ 82, 108,   9],\n",
       "       [ 89,  87, 123],\n",
       "       [ 33,  30, 114],\n",
       "       [ 89, 112,  93],\n",
       "       [ 86, 102,  86],\n",
       "       [ 15,   9,  33],\n",
       "       [ 17,  54, 141],\n",
       "       [ 18,  37,   5],\n",
       "       [108,  61,  77],\n",
       "       [127,  10,  56],\n",
       "       [ 83,  89,  79],\n",
       "       [103,  39, 122],\n",
       "       [  4, 115,  88],\n",
       "       [ 90,  30, 103],\n",
       "       [ 49,  58,  83],\n",
       "       [109, 137,   4],\n",
       "       [ 69,  94,  50],\n",
       "       [108, 143,  81],\n",
       "       [ 69, 117,  92],\n",
       "       [ 73,  90,  16],\n",
       "       [115,  75,  97],\n",
       "       [145,  62,  82],\n",
       "       [ 49, 144,  42],\n",
       "       [ 12,   4,  50],\n",
       "       [ 43, 116, 127],\n",
       "       [ 71, 130, 109],\n",
       "       [ 20,  43,  28],\n",
       "       [ 66,  94,  38],\n",
       "       [118,  30,  14],\n",
       "       [ 57,  37, 125],\n",
       "       [ 40, 142, 102],\n",
       "       [126, 125,  16],\n",
       "       [ 92, 102,  54],\n",
       "       [119,  90,  26],\n",
       "       [ 27,  51,  15],\n",
       "       [ 53, 143, 104],\n",
       "       [ 79,  50, 150],\n",
       "       [ 36,  18,  75],\n",
       "       [ 10,   3,  95],\n",
       "       [ 68,  84,  54],\n",
       "       [ 63,  24,  90],\n",
       "       [ 11, 128,  33],\n",
       "       [  1,  84, 133],\n",
       "       [ 97,  70,  84],\n",
       "       [ 30, 138, 131],\n",
       "       [129,  29, 101],\n",
       "       [ 79, 114, 142],\n",
       "       [  8, 140,   8],\n",
       "       [ 73,  37,  51],\n",
       "       [  2,  71,  29],\n",
       "       [135,  50,   9],\n",
       "       [  0, 148,  22],\n",
       "       [130, 127, 124],\n",
       "       [149, 119,  91],\n",
       "       [  0,  19, 127],\n",
       "       [ 93,  19, 109],\n",
       "       [150, 150, 116],\n",
       "       [141, 148,  48],\n",
       "       [ 52,  56, 145],\n",
       "       [104,  69,  73],\n",
       "       [ 54,  71, 109],\n",
       "       [ 53, 113,  49],\n",
       "       [112,  35,  11],\n",
       "       [ 32,  60, 120],\n",
       "       [ 94,  72,  50],\n",
       "       [ 50,  85, 110],\n",
       "       [ 68, 109, 121],\n",
       "       [ 21, 139,  76],\n",
       "       [ 67,  89, 137],\n",
       "       [143,  28,  10],\n",
       "       [ 42,  99,  63],\n",
       "       [122,  42,  16],\n",
       "       [141,  48,  14],\n",
       "       [ 39,  79,  27],\n",
       "       [  2,  91,  62],\n",
       "       [  9,  20,  46],\n",
       "       [ 50,   6,  56],\n",
       "       [ 67, 114, 107],\n",
       "       [136, 121,  55],\n",
       "       [135,  66,  32],\n",
       "       [ 47,  97,  56],\n",
       "       [ 69,  59,  53],\n",
       "       [ 34,  47,  76],\n",
       "       [131,  13, 116],\n",
       "       [147, 125,  76],\n",
       "       [139,  91,  33],\n",
       "       [145, 102, 134],\n",
       "       [ 54, 126, 147],\n",
       "       [ 53, 142,  38],\n",
       "       [132, 130, 150],\n",
       "       [ 47,  25,  77],\n",
       "       [ 77,  49, 145],\n",
       "       [ 36,  73,  53],\n",
       "       [ 75,  82,  89],\n",
       "       [ 76,  21,  94],\n",
       "       [100,  64,  51],\n",
       "       [144,  50, 127],\n",
       "       [ 64, 100,  39],\n",
       "       [147,  67,  93],\n",
       "       [104,  13,  15],\n",
       "       [128,  19,  91],\n",
       "       [104, 150,  29],\n",
       "       [ 51, 119,   9],\n",
       "       [107,  20,  39],\n",
       "       [  5, 132, 150],\n",
       "       [ 74,  23,  61],\n",
       "       [ 77,  20, 124],\n",
       "       [ 28, 129,  36],\n",
       "       [ 36, 120, 111],\n",
       "       [ 51, 106,  42],\n",
       "       [ 14,  91, 131],\n",
       "       [149,  58,  61],\n",
       "       [118,  33,   9],\n",
       "       [ 81, 146,  75],\n",
       "       [133, 141,  44],\n",
       "       [146,  87,  82],\n",
       "       [ 69,  13, 136],\n",
       "       [144, 102, 141],\n",
       "       [ 32,  91,  31],\n",
       "       [ 68, 137, 128],\n",
       "       [110,  12,  61],\n",
       "       [ 57,  49,   8],\n",
       "       [ 74,   3,  30],\n",
       "       [112,  92,  46],\n",
       "       [  5,  52,  46],\n",
       "       [  7, 140,  31],\n",
       "       [ 63, 123,  85],\n",
       "       [150, 117,  35],\n",
       "       [ 77,  19,   6],\n",
       "       [102,  87, 101],\n",
       "       [ 68,  18,  30],\n",
       "       [ 37,  35,  48],\n",
       "       [117, 105,  10],\n",
       "       [ 93, 113,  34],\n",
       "       [117,   4, 132],\n",
       "       [ 58,  47,  10],\n",
       "       [143, 150, 121],\n",
       "       [ 60,  99,  67],\n",
       "       [ 99,  70,  15],\n",
       "       [ 90, 144,   6],\n",
       "       [121,  36,  44],\n",
       "       [116,  36, 145],\n",
       "       [ 93,  26, 133],\n",
       "       [117, 112,  23],\n",
       "       [ 26,  71, 101],\n",
       "       [121, 134,  91],\n",
       "       [ 85, 100,  15],\n",
       "       [120,  28, 112],\n",
       "       [ 13,  74,  72],\n",
       "       [ 94,  93,  91],\n",
       "       [ 63,  13, 134],\n",
       "       [ 40,   9,  21],\n",
       "       [ 30,  28,  93],\n",
       "       [ 37, 103,  89],\n",
       "       [ 31, 102, 112],\n",
       "       [136,   9,  18],\n",
       "       [ 69, 100,  12],\n",
       "       [ 25,  41,  86],\n",
       "       [ 51,  25,  85],\n",
       "       [125,  39,  99],\n",
       "       [ 34, 118,  48],\n",
       "       [ 46, 106, 138],\n",
       "       [ 46,  66, 128],\n",
       "       [  8, 120,  40],\n",
       "       [ 19, 134,  15],\n",
       "       [ 48,  38,  80],\n",
       "       [ 39,  49,  96],\n",
       "       [ 44,  30, 122],\n",
       "       [ 51,  87, 109],\n",
       "       [ 91, 142, 107],\n",
       "       [ 59,  62, 146],\n",
       "       [  9,  58,  39],\n",
       "       [136, 104,  40],\n",
       "       [ 27,  46,  66],\n",
       "       [108,  59,  64],\n",
       "       [  0,  44, 138],\n",
       "       [ 76,  46, 129],\n",
       "       [148, 140,  39],\n",
       "       [131,  98, 133],\n",
       "       [149,  63,  87],\n",
       "       [ 53, 139,  58],\n",
       "       [  8,   6,   0],\n",
       "       [ 40,  78,  59],\n",
       "       [ 59,  56,   4],\n",
       "       [ 56, 147, 120],\n",
       "       [ 53,  67,  99],\n",
       "       [ 98,  11, 138],\n",
       "       [ 76,  18,  17],\n",
       "       [ 65,  43,  97],\n",
       "       [ 18, 113, 146],\n",
       "       [ 39,  79,  17],\n",
       "       [ 99,  59,  62],\n",
       "       [ 39,  84, 108],\n",
       "       [ 40,   6,  89],\n",
       "       [133, 140,  83],\n",
       "       [ 11, 125,  32],\n",
       "       [112,  71,  28],\n",
       "       [ 83,   4,  61],\n",
       "       [127,  27,  25],\n",
       "       [  8,  21,  10],\n",
       "       [ 31, 149,  53],\n",
       "       [138, 118, 128],\n",
       "       [ 22, 111,  46],\n",
       "       [ 30,  18,  56],\n",
       "       [ 74,  54, 111],\n",
       "       [ 79,  71,  68],\n",
       "       [121,  42,  53],\n",
       "       [ 63,  42,  14],\n",
       "       [ 16,   4, 138],\n",
       "       [ 97,  97,  75],\n",
       "       [ 69, 124, 143],\n",
       "       [ 15,  36, 123],\n",
       "       [ 16,  16,  77],\n",
       "       [ 42,  62,  43],\n",
       "       [  7,  13, 119],\n",
       "       [ 89, 149, 107]])"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "score = np.concatenate([a[0],a[1],a[2],a[3],a[4],a[5]])\n",
    "score"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "生成性别数组sex，水平叠加数组sex和score得到data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {
    "collapsed": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[0],\n",
       "       [0],\n",
       "       [1],\n",
       "       [1],\n",
       "       [1],\n",
       "       [0],\n",
       "       [1],\n",
       "       [0],\n",
       "       [1],\n",
       "       [1],\n",
       "       [1],\n",
       "       [1],\n",
       "       [0],\n",
       "       [1],\n",
       "       [1],\n",
       "       [1],\n",
       "       [0],\n",
       "       [0],\n",
       "       [0],\n",
       "       [0],\n",
       "       [1],\n",
       "       [0],\n",
       "       [0],\n",
       "       [1],\n",
       "       [1],\n",
       "       [0],\n",
       "       [1],\n",
       "       [0],\n",
       "       [1],\n",
       "       [1],\n",
       "       [0],\n",
       "       [0],\n",
       "       [1],\n",
       "       [1],\n",
       "       [1],\n",
       "       [0],\n",
       "       [1],\n",
       "       [0],\n",
       "       [0],\n",
       "       [0],\n",
       "       [1],\n",
       "       [0],\n",
       "       [0],\n",
       "       [0],\n",
       "       [1],\n",
       "       [1],\n",
       "       [0],\n",
       "       [1],\n",
       "       [0],\n",
       "       [0],\n",
       "       [0],\n",
       "       [1],\n",
       "       [0],\n",
       "       [1],\n",
       "       [0],\n",
       "       [0],\n",
       "       [1],\n",
       "       [0],\n",
       "       [1],\n",
       "       [0],\n",
       "       [1],\n",
       "       [1],\n",
       "       [1],\n",
       "       [0],\n",
       "       [1],\n",
       "       [0],\n",
       "       [0],\n",
       "       [0],\n",
       "       [0],\n",
       "       [1],\n",
       "       [1],\n",
       "       [1],\n",
       "       [1],\n",
       "       [0],\n",
       "       [0],\n",
       "       [0],\n",
       "       [0],\n",
       "       [0],\n",
       "       [0],\n",
       "       [0],\n",
       "       [0],\n",
       "       [1],\n",
       "       [1],\n",
       "       [1],\n",
       "       [1],\n",
       "       [0],\n",
       "       [0],\n",
       "       [1],\n",
       "       [1],\n",
       "       [0],\n",
       "       [1],\n",
       "       [1],\n",
       "       [1],\n",
       "       [0],\n",
       "       [0],\n",
       "       [0],\n",
       "       [1],\n",
       "       [0],\n",
       "       [0],\n",
       "       [0],\n",
       "       [1],\n",
       "       [1],\n",
       "       [0],\n",
       "       [1],\n",
       "       [0],\n",
       "       [0],\n",
       "       [0],\n",
       "       [1],\n",
       "       [1],\n",
       "       [0],\n",
       "       [0],\n",
       "       [0],\n",
       "       [0],\n",
       "       [0],\n",
       "       [1],\n",
       "       [0],\n",
       "       [1],\n",
       "       [1],\n",
       "       [0],\n",
       "       [0],\n",
       "       [0],\n",
       "       [1],\n",
       "       [1],\n",
       "       [1],\n",
       "       [1],\n",
       "       [0],\n",
       "       [0],\n",
       "       [1],\n",
       "       [0],\n",
       "       [0],\n",
       "       [1],\n",
       "       [1],\n",
       "       [0],\n",
       "       [0],\n",
       "       [1],\n",
       "       [0],\n",
       "       [1],\n",
       "       [1],\n",
       "       [0],\n",
       "       [0],\n",
       "       [1],\n",
       "       [0],\n",
       "       [1],\n",
       "       [1],\n",
       "       [1],\n",
       "       [1],\n",
       "       [1],\n",
       "       [0],\n",
       "       [0],\n",
       "       [1],\n",
       "       [0],\n",
       "       [1],\n",
       "       [0],\n",
       "       [0],\n",
       "       [0],\n",
       "       [1],\n",
       "       [0],\n",
       "       [1],\n",
       "       [0],\n",
       "       [0],\n",
       "       [1],\n",
       "       [1],\n",
       "       [1],\n",
       "       [0],\n",
       "       [0],\n",
       "       [0],\n",
       "       [1],\n",
       "       [0],\n",
       "       [0],\n",
       "       [0],\n",
       "       [1],\n",
       "       [1],\n",
       "       [1],\n",
       "       [1],\n",
       "       [0],\n",
       "       [1],\n",
       "       [1],\n",
       "       [0],\n",
       "       [1],\n",
       "       [0],\n",
       "       [1],\n",
       "       [0],\n",
       "       [1],\n",
       "       [1],\n",
       "       [0],\n",
       "       [0],\n",
       "       [0],\n",
       "       [0],\n",
       "       [0],\n",
       "       [0],\n",
       "       [1],\n",
       "       [0],\n",
       "       [1],\n",
       "       [0],\n",
       "       [0],\n",
       "       [1],\n",
       "       [0],\n",
       "       [0],\n",
       "       [1],\n",
       "       [0],\n",
       "       [0],\n",
       "       [1],\n",
       "       [0],\n",
       "       [1],\n",
       "       [1],\n",
       "       [1],\n",
       "       [0],\n",
       "       [1],\n",
       "       [0],\n",
       "       [1],\n",
       "       [1],\n",
       "       [0],\n",
       "       [1],\n",
       "       [0],\n",
       "       [0],\n",
       "       [1],\n",
       "       [1],\n",
       "       [1],\n",
       "       [0],\n",
       "       [0],\n",
       "       [1],\n",
       "       [0],\n",
       "       [0],\n",
       "       [0],\n",
       "       [1],\n",
       "       [1],\n",
       "       [0],\n",
       "       [1],\n",
       "       [0],\n",
       "       [0],\n",
       "       [1],\n",
       "       [1],\n",
       "       [0],\n",
       "       [0],\n",
       "       [0],\n",
       "       [0],\n",
       "       [0],\n",
       "       [0],\n",
       "       [0],\n",
       "       [0],\n",
       "       [0],\n",
       "       [1],\n",
       "       [1],\n",
       "       [0],\n",
       "       [0],\n",
       "       [0],\n",
       "       [0],\n",
       "       [1],\n",
       "       [1],\n",
       "       [1],\n",
       "       [1],\n",
       "       [1],\n",
       "       [0],\n",
       "       [0],\n",
       "       [1],\n",
       "       [1],\n",
       "       [0],\n",
       "       [1],\n",
       "       [0],\n",
       "       [0],\n",
       "       [0],\n",
       "       [1],\n",
       "       [1],\n",
       "       [0],\n",
       "       [1],\n",
       "       [0],\n",
       "       [1],\n",
       "       [1],\n",
       "       [1],\n",
       "       [0],\n",
       "       [1],\n",
       "       [1],\n",
       "       [0],\n",
       "       [1],\n",
       "       [1],\n",
       "       [1],\n",
       "       [1],\n",
       "       [1],\n",
       "       [0],\n",
       "       [1],\n",
       "       [1],\n",
       "       [1],\n",
       "       [0],\n",
       "       [1],\n",
       "       [0],\n",
       "       [0],\n",
       "       [1],\n",
       "       [0],\n",
       "       [1],\n",
       "       [0],\n",
       "       [0],\n",
       "       [1],\n",
       "       [0],\n",
       "       [1],\n",
       "       [0],\n",
       "       [0],\n",
       "       [1],\n",
       "       [1],\n",
       "       [1],\n",
       "       [1]])"
      ]
     },
     "execution_count": 16,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "sex = np.random.randint(0,2,size = (300,1))\n",
    "sex"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[143,   3,  74,   0],\n",
       "       [ 93, 130, 112,   0],\n",
       "       [138,  15,  83,   1],\n",
       "       ...,\n",
       "       [ 42,  62,  43,   1],\n",
       "       [  7,  13, 119,   1],\n",
       "       [ 89, 149, 107,   1]])"
      ]
     },
     "execution_count": 24,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data = np.concatenate([score,sex],axis = 1)\n",
    "data"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "分别计算男女生各科成绩统计指标：最小值、最大值、平均分、中位数、标准差"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 95,
   "metadata": {
    "collapsed": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[  0,   3],\n",
       "       [  1,   3],\n",
       "       [  3,   2],\n",
       "       [  5,   3],\n",
       "       [  7,   3],\n",
       "       [ 12,   3],\n",
       "       [ 16,   3],\n",
       "       [ 17,   3],\n",
       "       [ 18,   3],\n",
       "       [ 19,   3],\n",
       "       [ 21,   3],\n",
       "       [ 22,   3],\n",
       "       [ 25,   3],\n",
       "       [ 27,   3],\n",
       "       [ 30,   3],\n",
       "       [ 31,   3],\n",
       "       [ 35,   3],\n",
       "       [ 37,   3],\n",
       "       [ 38,   3],\n",
       "       [ 39,   3],\n",
       "       [ 41,   3],\n",
       "       [ 42,   3],\n",
       "       [ 43,   3],\n",
       "       [ 46,   3],\n",
       "       [ 48,   3],\n",
       "       [ 49,   3],\n",
       "       [ 50,   3],\n",
       "       [ 52,   3],\n",
       "       [ 54,   3],\n",
       "       [ 55,   3],\n",
       "       [ 57,   3],\n",
       "       [ 59,   3],\n",
       "       [ 63,   3],\n",
       "       [ 65,   3],\n",
       "       [ 66,   3],\n",
       "       [ 67,   3],\n",
       "       [ 68,   3],\n",
       "       [ 72,   0],\n",
       "       [ 73,   3],\n",
       "       [ 74,   3],\n",
       "       [ 75,   3],\n",
       "       [ 76,   3],\n",
       "       [ 77,   0],\n",
       "       [ 77,   3],\n",
       "       [ 78,   3],\n",
       "       [ 79,   3],\n",
       "       [ 80,   3],\n",
       "       [ 85,   3],\n",
       "       [ 86,   3],\n",
       "       [ 89,   3],\n",
       "       [ 93,   3],\n",
       "       [ 94,   3],\n",
       "       [ 95,   3],\n",
       "       [ 97,   3],\n",
       "       [ 98,   3],\n",
       "       [ 99,   3],\n",
       "       [102,   3],\n",
       "       [104,   3],\n",
       "       [105,   3],\n",
       "       [106,   3],\n",
       "       [109,   3],\n",
       "       [110,   3],\n",
       "       [111,   3],\n",
       "       [112,   3],\n",
       "       [113,   3],\n",
       "       [115,   3],\n",
       "       [118,   3],\n",
       "       [119,   3],\n",
       "       [120,   3],\n",
       "       [125,   3],\n",
       "       [126,   3],\n",
       "       [128,   3],\n",
       "       [129,   3],\n",
       "       [132,   3],\n",
       "       [133,   3],\n",
       "       [135,   0],\n",
       "       [135,   3],\n",
       "       [138,   0],\n",
       "       [138,   3],\n",
       "       [139,   3],\n",
       "       [141,   3],\n",
       "       [147,   3],\n",
       "       [148,   3],\n",
       "       [150,   3],\n",
       "       [152,   3],\n",
       "       [153,   3],\n",
       "       [154,   3],\n",
       "       [156,   3],\n",
       "       [158,   3],\n",
       "       [159,   3],\n",
       "       [163,   3],\n",
       "       [164,   3],\n",
       "       [165,   3],\n",
       "       [167,   3],\n",
       "       [168,   3],\n",
       "       [169,   3],\n",
       "       [174,   3],\n",
       "       [177,   3],\n",
       "       [179,   3],\n",
       "       [181,   3],\n",
       "       [184,   3],\n",
       "       [185,   3],\n",
       "       [186,   3],\n",
       "       [187,   3],\n",
       "       [188,   3],\n",
       "       [189,   3],\n",
       "       [191,   3],\n",
       "       [193,   3],\n",
       "       [194,   3],\n",
       "       [196,   3],\n",
       "       [197,   3],\n",
       "       [199,   3],\n",
       "       [200,   3],\n",
       "       [202,   3],\n",
       "       [206,   3],\n",
       "       [208,   3],\n",
       "       [211,   3],\n",
       "       [213,   3],\n",
       "       [214,   3],\n",
       "       [218,   3],\n",
       "       [219,   3],\n",
       "       [221,   3],\n",
       "       [222,   3],\n",
       "       [223,   3],\n",
       "       [226,   3],\n",
       "       [228,   3],\n",
       "       [229,   3],\n",
       "       [232,   3],\n",
       "       [233,   3],\n",
       "       [234,   3],\n",
       "       [235,   3],\n",
       "       [236,   3],\n",
       "       [237,   3],\n",
       "       [238,   3],\n",
       "       [239,   3],\n",
       "       [240,   3],\n",
       "       [243,   3],\n",
       "       [244,   3],\n",
       "       [245,   3],\n",
       "       [246,   3],\n",
       "       [252,   3],\n",
       "       [253,   3],\n",
       "       [256,   3],\n",
       "       [258,   3],\n",
       "       [259,   0],\n",
       "       [259,   3],\n",
       "       [260,   3],\n",
       "       [263,   3],\n",
       "       [265,   2],\n",
       "       [265,   3],\n",
       "       [269,   3],\n",
       "       [272,   3],\n",
       "       [278,   3],\n",
       "       [282,   3],\n",
       "       [284,   3],\n",
       "       [285,   3],\n",
       "       [287,   3],\n",
       "       [289,   3],\n",
       "       [290,   3],\n",
       "       [292,   3],\n",
       "       [294,   3],\n",
       "       [295,   3]], dtype=int64)"
      ]
     },
     "execution_count": 95,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "m = data.copy()\n",
    "m\n",
    "index1 = np.argwhere(m == 0)\n",
    "index1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 96,
   "metadata": {
    "collapsed": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[array([143,   3,  74,   0]), array([ 93, 130, 112,   0]), array([62, 75, 54,  0]), array([90, 11,  5,  0]), array([114, 148,  87,   0]), array([37, 82, 59,  0]), array([42, 93,  3,  0]), array([ 63, 114,  12,   0]), array([144,  19, 131,   0]), array([113,  31,  73,   0]), array([116,  31,  25,   0]), array([115,  51, 100,   0]), array([ 96,   2, 134,   0]), array([112, 100,  47,   0]), array([ 67, 137,  51,   0]), array([121,  77, 130,   0]), array([146,  23,  34,   0]), array([ 10,  37, 142,   0]), array([105,  80, 115,   0]), array([99, 92, 52,  0]), array([ 1, 10, 36,  0]), array([31,  8, 89,  0]), array([145,  71,  86,   0]), array([105,  15, 123,   0]), array([109,  67,  51,   0]), array([ 78, 135,   1,   0]), array([ 96,  17, 134,   0]), array([101, 142,  91,   0]), array([ 36,  18, 123,   0]), array([117,  68,  96,   0]), array([136,   3, 132,   0]), array([125,  34,  81,   0]), array([75, 62, 91,  0]), array([ 33,  83, 114,   0]), array([98, 55, 49,  0]), array([ 21, 108,  62,   0]), array([ 85, 138,  73,   0]), array([27, 84,  2,  0]), array([128,   3,  12,   0]), array([ 11,   3, 119,   0]), array([  0, 142,  12,   0]), array([75, 20, 14,  0]), array([144,  95,  29,   0]), array([25, 47, 76,  0]), array([ 89,  87, 123,   0]), array([ 33,  30, 114,   0]), array([15,  9, 33,  0]), array([127,  10,  56,   0]), array([83, 89, 79,  0]), array([103,  39, 122,   0]), array([ 90,  30, 103,   0]), array([49, 58, 83,  0]), array([109, 137,   4,   0]), array([ 69, 117,  92,   0]), array([115,  75,  97,   0]), array([145,  62,  82,   0]), array([ 49, 144,  42,   0]), array([ 71, 130, 109,   0]), array([20, 43, 28,  0]), array([66, 94, 38,  0]), array([118,  30,  14,   0]), array([ 57,  37, 125,   0]), array([126, 125,  16,   0]), array([27, 51, 15,  0]), array([ 53, 143, 104,   0]), array([ 79,  50, 150,   0]), array([ 11, 128,  33,   0]), array([  1,  84, 133,   0]), array([ 30, 138, 131,   0]), array([129,  29, 101,   0]), array([73, 37, 51,  0]), array([ 2, 71, 29,  0]), array([  0, 148,  22,   0]), array([  0,  19, 127,   0]), array([ 93,  19, 109,   0]), array([141, 148,  48,   0]), array([ 32,  60, 120,   0]), array([94, 72, 50,  0]), array([ 68, 109, 121,   0]), array([ 67,  89, 137,   0]), array([143,  28,  10,   0]), array([42, 99, 63,  0]), array([141,  48,  14,   0]), array([ 2, 91, 62,  0]), array([ 9, 20, 46,  0]), array([135,  66,  32,   0]), array([47, 97, 56,  0]), array([69, 59, 53,  0]), array([131,  13, 116,   0]), array([147, 125,  76,   0]), array([139,  91,  33,   0]), array([47, 25, 77,  0]), array([75, 82, 89,  0]), array([100,  64,  51,   0]), array([ 64, 100,  39,   0]), array([128,  19,  91,   0]), array([104, 150,  29,   0]), array([ 51, 119,   9,   0]), array([107,  20,  39,   0]), array([  5, 132, 150,   0]), array([74, 23, 61,  0]), array([ 28, 129,  36,   0]), array([ 51, 106,  42,   0]), array([ 14,  91, 131,   0]), array([118,  33,   9,   0]), array([ 81, 146,  75,   0]), array([146,  87,  82,   0]), array([ 69,  13, 136,   0]), array([32, 91, 31,  0]), array([74,  3, 30,  0]), array([ 5, 52, 46,  0]), array([150, 117,  35,   0]), array([102,  87, 101,   0]), array([68, 18, 30,  0]), array([117,   4, 132,   0]), array([58, 47, 10,  0]), array([60, 99, 67,  0]), array([99, 70, 15,  0]), array([ 90, 144,   6,   0]), array([ 93,  26, 133,   0]), array([ 26,  71, 101,   0]), array([121, 134,  91,   0]), array([13, 74, 72,  0]), array([94, 93, 91,  0]), array([ 63,  13, 134,   0]), array([40,  9, 21,  0]), array([30, 28, 93,  0]), array([ 37, 103,  89,   0]), array([ 31, 102, 112,   0]), array([136,   9,  18,   0]), array([ 69, 100,  12,   0]), array([125,  39,  99,   0]), array([ 34, 118,  48,   0]), array([ 46, 106, 138,   0]), array([ 46,  66, 128,   0]), array([ 51,  87, 109,   0]), array([ 91, 142, 107,   0]), array([136, 104,  40,   0]), array([108,  59,  64,   0]), array([  0,  44, 138,   0]), array([ 76,  46, 129,   0]), array([149,  63,  87,   0]), array([8, 6, 0, 0]), array([53, 67, 99,  0]), array([65, 43, 97,  0]), array([133, 140,  83,   0]), array([127,  27,  25,   0]), array([ 31, 149,  53,   0]), array([138, 118, 128,   0]), array([30, 18, 56,  0]), array([79, 71, 68,  0]), array([121,  42,  53,   0]), array([ 16,   4, 138,   0]), array([ 69, 124, 143,   0]), array([ 15,  36, 123,   0])]\n"
     ]
    }
   ],
   "source": [
    "list = []\n",
    "for i,j in index1:\n",
    "    if j !=3:\n",
    "        continue\n",
    "    list.append(m[i])\n",
    "print(list)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 101,
   "metadata": {
    "collapsed": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[143,   3,  74,   0],\n",
       "       [ 93, 130, 112,   0],\n",
       "       [ 62,  75,  54,   0],\n",
       "       [ 90,  11,   5,   0],\n",
       "       [114, 148,  87,   0],\n",
       "       [ 37,  82,  59,   0],\n",
       "       [ 42,  93,   3,   0],\n",
       "       [ 63, 114,  12,   0],\n",
       "       [144,  19, 131,   0],\n",
       "       [113,  31,  73,   0],\n",
       "       [116,  31,  25,   0],\n",
       "       [115,  51, 100,   0],\n",
       "       [ 96,   2, 134,   0],\n",
       "       [112, 100,  47,   0],\n",
       "       [ 67, 137,  51,   0],\n",
       "       [121,  77, 130,   0],\n",
       "       [146,  23,  34,   0],\n",
       "       [ 10,  37, 142,   0],\n",
       "       [105,  80, 115,   0],\n",
       "       [ 99,  92,  52,   0],\n",
       "       [  1,  10,  36,   0],\n",
       "       [ 31,   8,  89,   0],\n",
       "       [145,  71,  86,   0],\n",
       "       [105,  15, 123,   0],\n",
       "       [109,  67,  51,   0],\n",
       "       [ 78, 135,   1,   0],\n",
       "       [ 96,  17, 134,   0],\n",
       "       [101, 142,  91,   0],\n",
       "       [ 36,  18, 123,   0],\n",
       "       [117,  68,  96,   0],\n",
       "       [136,   3, 132,   0],\n",
       "       [125,  34,  81,   0],\n",
       "       [ 75,  62,  91,   0],\n",
       "       [ 33,  83, 114,   0],\n",
       "       [ 98,  55,  49,   0],\n",
       "       [ 21, 108,  62,   0],\n",
       "       [ 85, 138,  73,   0],\n",
       "       [ 27,  84,   2,   0],\n",
       "       [128,   3,  12,   0],\n",
       "       [ 11,   3, 119,   0],\n",
       "       [  0, 142,  12,   0],\n",
       "       [ 75,  20,  14,   0],\n",
       "       [144,  95,  29,   0],\n",
       "       [ 25,  47,  76,   0],\n",
       "       [ 89,  87, 123,   0],\n",
       "       [ 33,  30, 114,   0],\n",
       "       [ 15,   9,  33,   0],\n",
       "       [127,  10,  56,   0],\n",
       "       [ 83,  89,  79,   0],\n",
       "       [103,  39, 122,   0],\n",
       "       [ 90,  30, 103,   0],\n",
       "       [ 49,  58,  83,   0],\n",
       "       [109, 137,   4,   0],\n",
       "       [ 69, 117,  92,   0],\n",
       "       [115,  75,  97,   0],\n",
       "       [145,  62,  82,   0],\n",
       "       [ 49, 144,  42,   0],\n",
       "       [ 71, 130, 109,   0],\n",
       "       [ 20,  43,  28,   0],\n",
       "       [ 66,  94,  38,   0],\n",
       "       [118,  30,  14,   0],\n",
       "       [ 57,  37, 125,   0],\n",
       "       [126, 125,  16,   0],\n",
       "       [ 27,  51,  15,   0],\n",
       "       [ 53, 143, 104,   0],\n",
       "       [ 79,  50, 150,   0],\n",
       "       [ 11, 128,  33,   0],\n",
       "       [  1,  84, 133,   0],\n",
       "       [ 30, 138, 131,   0],\n",
       "       [129,  29, 101,   0],\n",
       "       [ 73,  37,  51,   0],\n",
       "       [  2,  71,  29,   0],\n",
       "       [  0, 148,  22,   0],\n",
       "       [  0,  19, 127,   0],\n",
       "       [ 93,  19, 109,   0],\n",
       "       [141, 148,  48,   0],\n",
       "       [ 32,  60, 120,   0],\n",
       "       [ 94,  72,  50,   0],\n",
       "       [ 68, 109, 121,   0],\n",
       "       [ 67,  89, 137,   0],\n",
       "       [143,  28,  10,   0],\n",
       "       [ 42,  99,  63,   0],\n",
       "       [141,  48,  14,   0],\n",
       "       [  2,  91,  62,   0],\n",
       "       [  9,  20,  46,   0],\n",
       "       [135,  66,  32,   0],\n",
       "       [ 47,  97,  56,   0],\n",
       "       [ 69,  59,  53,   0],\n",
       "       [131,  13, 116,   0],\n",
       "       [147, 125,  76,   0],\n",
       "       [139,  91,  33,   0],\n",
       "       [ 47,  25,  77,   0],\n",
       "       [ 75,  82,  89,   0],\n",
       "       [100,  64,  51,   0],\n",
       "       [ 64, 100,  39,   0],\n",
       "       [128,  19,  91,   0],\n",
       "       [104, 150,  29,   0],\n",
       "       [ 51, 119,   9,   0],\n",
       "       [107,  20,  39,   0],\n",
       "       [  5, 132, 150,   0],\n",
       "       [ 74,  23,  61,   0],\n",
       "       [ 28, 129,  36,   0],\n",
       "       [ 51, 106,  42,   0],\n",
       "       [ 14,  91, 131,   0],\n",
       "       [118,  33,   9,   0],\n",
       "       [ 81, 146,  75,   0],\n",
       "       [146,  87,  82,   0],\n",
       "       [ 69,  13, 136,   0],\n",
       "       [ 32,  91,  31,   0],\n",
       "       [ 74,   3,  30,   0],\n",
       "       [  5,  52,  46,   0],\n",
       "       [150, 117,  35,   0],\n",
       "       [102,  87, 101,   0],\n",
       "       [ 68,  18,  30,   0],\n",
       "       [117,   4, 132,   0],\n",
       "       [ 58,  47,  10,   0],\n",
       "       [ 60,  99,  67,   0],\n",
       "       [ 99,  70,  15,   0],\n",
       "       [ 90, 144,   6,   0],\n",
       "       [ 93,  26, 133,   0],\n",
       "       [ 26,  71, 101,   0],\n",
       "       [121, 134,  91,   0],\n",
       "       [ 13,  74,  72,   0],\n",
       "       [ 94,  93,  91,   0],\n",
       "       [ 63,  13, 134,   0],\n",
       "       [ 40,   9,  21,   0],\n",
       "       [ 30,  28,  93,   0],\n",
       "       [ 37, 103,  89,   0],\n",
       "       [ 31, 102, 112,   0],\n",
       "       [136,   9,  18,   0],\n",
       "       [ 69, 100,  12,   0],\n",
       "       [125,  39,  99,   0],\n",
       "       [ 34, 118,  48,   0],\n",
       "       [ 46, 106, 138,   0],\n",
       "       [ 46,  66, 128,   0],\n",
       "       [ 51,  87, 109,   0],\n",
       "       [ 91, 142, 107,   0],\n",
       "       [136, 104,  40,   0],\n",
       "       [108,  59,  64,   0],\n",
       "       [  0,  44, 138,   0],\n",
       "       [ 76,  46, 129,   0],\n",
       "       [149,  63,  87,   0],\n",
       "       [  8,   6,   0,   0],\n",
       "       [ 53,  67,  99,   0],\n",
       "       [ 65,  43,  97,   0],\n",
       "       [133, 140,  83,   0],\n",
       "       [127,  27,  25,   0],\n",
       "       [ 31, 149,  53,   0],\n",
       "       [138, 118, 128,   0],\n",
       "       [ 30,  18,  56,   0],\n",
       "       [ 79,  71,  68,   0],\n",
       "       [121,  42,  53,   0],\n",
       "       [ 16,   4, 138,   0],\n",
       "       [ 69, 124, 143,   0],\n",
       "       [ 15,  36, 123,   0]])"
      ]
     },
     "execution_count": 101,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "m = np.concatenate([list[:],])\n",
    "m"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 103,
   "metadata": {
    "collapsed": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[143,  93,  62,  90, 114,  37,  42,  63, 144, 113, 116, 115,  96,\n",
       "        112,  67, 121, 146,  10, 105,  99,   1,  31, 145, 105, 109,  78,\n",
       "         96, 101,  36, 117, 136, 125,  75,  33,  98,  21,  85,  27, 128,\n",
       "         11,   0,  75, 144,  25,  89,  33,  15, 127,  83, 103,  90,  49,\n",
       "        109,  69, 115, 145,  49,  71,  20,  66, 118,  57, 126,  27,  53,\n",
       "         79,  11,   1,  30, 129,  73,   2,   0,   0,  93, 141,  32,  94,\n",
       "         68,  67, 143,  42, 141,   2,   9, 135,  47,  69, 131, 147, 139,\n",
       "         47,  75, 100,  64, 128, 104,  51, 107,   5,  74,  28,  51,  14,\n",
       "        118,  81, 146,  69,  32,  74,   5, 150, 102,  68, 117,  58,  60,\n",
       "         99,  90,  93,  26, 121,  13,  94,  63,  40,  30,  37,  31, 136,\n",
       "         69, 125,  34,  46,  46,  51,  91, 136, 108,   0,  76, 149,   8,\n",
       "         53,  65, 133, 127,  31, 138,  30,  79, 121,  16,  69,  15],\n",
       "       [  3, 130,  75,  11, 148,  82,  93, 114,  19,  31,  31,  51,   2,\n",
       "        100, 137,  77,  23,  37,  80,  92,  10,   8,  71,  15,  67, 135,\n",
       "         17, 142,  18,  68,   3,  34,  62,  83,  55, 108, 138,  84,   3,\n",
       "          3, 142,  20,  95,  47,  87,  30,   9,  10,  89,  39,  30,  58,\n",
       "        137, 117,  75,  62, 144, 130,  43,  94,  30,  37, 125,  51, 143,\n",
       "         50, 128,  84, 138,  29,  37,  71, 148,  19,  19, 148,  60,  72,\n",
       "        109,  89,  28,  99,  48,  91,  20,  66,  97,  59,  13, 125,  91,\n",
       "         25,  82,  64, 100,  19, 150, 119,  20, 132,  23, 129, 106,  91,\n",
       "         33, 146,  87,  13,  91,   3,  52, 117,  87,  18,   4,  47,  99,\n",
       "         70, 144,  26,  71, 134,  74,  93,  13,   9,  28, 103, 102,   9,\n",
       "        100,  39, 118, 106,  66,  87, 142, 104,  59,  44,  46,  63,   6,\n",
       "         67,  43, 140,  27, 149, 118,  18,  71,  42,   4, 124,  36],\n",
       "       [ 74, 112,  54,   5,  87,  59,   3,  12, 131,  73,  25, 100, 134,\n",
       "         47,  51, 130,  34, 142, 115,  52,  36,  89,  86, 123,  51,   1,\n",
       "        134,  91, 123,  96, 132,  81,  91, 114,  49,  62,  73,   2,  12,\n",
       "        119,  12,  14,  29,  76, 123, 114,  33,  56,  79, 122, 103,  83,\n",
       "          4,  92,  97,  82,  42, 109,  28,  38,  14, 125,  16,  15, 104,\n",
       "        150,  33, 133, 131, 101,  51,  29,  22, 127, 109,  48, 120,  50,\n",
       "        121, 137,  10,  63,  14,  62,  46,  32,  56,  53, 116,  76,  33,\n",
       "         77,  89,  51,  39,  91,  29,   9,  39, 150,  61,  36,  42, 131,\n",
       "          9,  75,  82, 136,  31,  30,  46,  35, 101,  30, 132,  10,  67,\n",
       "         15,   6, 133, 101,  91,  72,  91, 134,  21,  93,  89, 112,  18,\n",
       "         12,  99,  48, 138, 128, 109, 107,  40,  64, 138, 129,  87,   0,\n",
       "         99,  97,  83,  25,  53, 128,  56,  68,  53, 138, 143, 123],\n",
       "       [  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,\n",
       "          0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,\n",
       "          0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,\n",
       "          0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,\n",
       "          0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,\n",
       "          0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,\n",
       "          0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,\n",
       "          0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,\n",
       "          0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,\n",
       "          0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,\n",
       "          0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,\n",
       "          0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0]])"
      ]
     },
     "execution_count": 103,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "m1 = m.T\n",
    "m1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 108,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0"
      ]
     },
     "execution_count": 108,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.min(m1[0])#男生Python科目最小值"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 106,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "150"
      ]
     },
     "execution_count": 106,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.max(m1[0])#男生Python科目最大值"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 109,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "75.78064516129032"
      ]
     },
     "execution_count": 109,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.mean(m1[0])#男生Python科目均值"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 110,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "75.0"
      ]
     },
     "execution_count": 110,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.median(m1[0])#男生Python科目中位数"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 111,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "44.120256626010885"
      ]
     },
     "execution_count": 111,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.std(m1[0])#男生Python科目标准差"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 112,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "2"
      ]
     },
     "execution_count": 112,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.min(m1[1])#男生数学科目最小值"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 113,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "150"
      ]
     },
     "execution_count": 113,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.max(m1[1])#男生数学科目最大值"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 114,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "69.63870967741936"
      ]
     },
     "execution_count": 114,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.mean(m1[1])#男生数学科目均值"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 115,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "68.0"
      ]
     },
     "execution_count": 115,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.median(m1[1])#男生数学科目中位数"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 116,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "44.60954387557309"
      ]
     },
     "execution_count": 116,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.std(m1[1])#男生数学科目标准差"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 117,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0"
      ]
     },
     "execution_count": 117,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.min(m1[2])#男生语文科目最小值"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 118,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "150"
      ]
     },
     "execution_count": 118,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.max(m1[2])#男生语文科目最大值"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 119,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "72.9483870967742"
      ]
     },
     "execution_count": 119,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.mean(m1[2])#男生语文科目均值"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 120,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "74.0"
      ]
     },
     "execution_count": 120,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.median(m1[2])#男生语文科目中位数"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 121,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "42.71840179872432"
      ]
     },
     "execution_count": 121,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.std(m1[2])#男生语文科目标准差"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 123,
   "metadata": {
    "collapsed": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[  2,   3],\n",
       "       [  3,   1],\n",
       "       [  3,   3],\n",
       "       [  4,   3],\n",
       "       [  6,   3],\n",
       "       [  8,   3],\n",
       "       [  9,   3],\n",
       "       [ 10,   3],\n",
       "       [ 11,   3],\n",
       "       [ 13,   3],\n",
       "       [ 14,   3],\n",
       "       [ 15,   3],\n",
       "       [ 20,   3],\n",
       "       [ 23,   3],\n",
       "       [ 24,   3],\n",
       "       [ 26,   3],\n",
       "       [ 28,   3],\n",
       "       [ 29,   3],\n",
       "       [ 32,   3],\n",
       "       [ 33,   3],\n",
       "       [ 34,   3],\n",
       "       [ 36,   3],\n",
       "       [ 40,   3],\n",
       "       [ 42,   0],\n",
       "       [ 44,   3],\n",
       "       [ 45,   3],\n",
       "       [ 47,   3],\n",
       "       [ 50,   2],\n",
       "       [ 51,   3],\n",
       "       [ 53,   3],\n",
       "       [ 56,   3],\n",
       "       [ 58,   3],\n",
       "       [ 60,   3],\n",
       "       [ 61,   3],\n",
       "       [ 62,   3],\n",
       "       [ 64,   3],\n",
       "       [ 69,   3],\n",
       "       [ 70,   3],\n",
       "       [ 71,   3],\n",
       "       [ 72,   3],\n",
       "       [ 81,   3],\n",
       "       [ 82,   3],\n",
       "       [ 83,   3],\n",
       "       [ 84,   3],\n",
       "       [ 87,   3],\n",
       "       [ 88,   3],\n",
       "       [ 90,   3],\n",
       "       [ 91,   3],\n",
       "       [ 92,   3],\n",
       "       [ 96,   3],\n",
       "       [100,   3],\n",
       "       [101,   3],\n",
       "       [103,   3],\n",
       "       [107,   3],\n",
       "       [108,   3],\n",
       "       [114,   3],\n",
       "       [116,   3],\n",
       "       [117,   3],\n",
       "       [121,   3],\n",
       "       [122,   3],\n",
       "       [123,   3],\n",
       "       [124,   3],\n",
       "       [126,   0],\n",
       "       [127,   3],\n",
       "       [130,   3],\n",
       "       [131,   3],\n",
       "       [134,   3],\n",
       "       [136,   3],\n",
       "       [137,   3],\n",
       "       [140,   3],\n",
       "       [142,   3],\n",
       "       [143,   3],\n",
       "       [144,   3],\n",
       "       [145,   3],\n",
       "       [146,   3],\n",
       "       [149,   3],\n",
       "       [151,   3],\n",
       "       [155,   3],\n",
       "       [157,   3],\n",
       "       [160,   3],\n",
       "       [161,   3],\n",
       "       [162,   3],\n",
       "       [166,   3],\n",
       "       [170,   3],\n",
       "       [171,   3],\n",
       "       [172,   3],\n",
       "       [173,   3],\n",
       "       [175,   3],\n",
       "       [176,   3],\n",
       "       [178,   3],\n",
       "       [180,   3],\n",
       "       [182,   3],\n",
       "       [183,   3],\n",
       "       [190,   3],\n",
       "       [192,   3],\n",
       "       [195,   3],\n",
       "       [198,   3],\n",
       "       [201,   3],\n",
       "       [203,   3],\n",
       "       [204,   3],\n",
       "       [205,   3],\n",
       "       [207,   3],\n",
       "       [209,   3],\n",
       "       [210,   3],\n",
       "       [212,   3],\n",
       "       [215,   3],\n",
       "       [216,   3],\n",
       "       [217,   3],\n",
       "       [220,   3],\n",
       "       [224,   3],\n",
       "       [225,   3],\n",
       "       [227,   3],\n",
       "       [230,   3],\n",
       "       [231,   3],\n",
       "       [241,   3],\n",
       "       [242,   3],\n",
       "       [247,   3],\n",
       "       [248,   3],\n",
       "       [249,   3],\n",
       "       [250,   3],\n",
       "       [251,   3],\n",
       "       [254,   3],\n",
       "       [255,   3],\n",
       "       [257,   3],\n",
       "       [261,   3],\n",
       "       [262,   3],\n",
       "       [264,   3],\n",
       "       [266,   3],\n",
       "       [267,   3],\n",
       "       [268,   3],\n",
       "       [270,   3],\n",
       "       [271,   3],\n",
       "       [273,   3],\n",
       "       [274,   3],\n",
       "       [275,   3],\n",
       "       [276,   3],\n",
       "       [277,   3],\n",
       "       [279,   3],\n",
       "       [280,   3],\n",
       "       [281,   3],\n",
       "       [283,   3],\n",
       "       [286,   3],\n",
       "       [288,   3],\n",
       "       [291,   3],\n",
       "       [293,   3],\n",
       "       [296,   3],\n",
       "       [297,   3],\n",
       "       [298,   3],\n",
       "       [299,   3]], dtype=int64)"
      ]
     },
     "execution_count": 123,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "f = data.copy()\n",
    "f\n",
    "index2 = np.argwhere(f == 1)\n",
    "index2"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 125,
   "metadata": {
    "collapsed": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[array([138,  15,  83,   1]), array([132,   1,   0,   1]), array([141, 114,   5,   1]), array([133,  30,  21,   1]), array([109,  41,  76,   1]), array([28,  7, 79,  1]), array([15, 58,  6,  1]), array([ 62, 110,  11,   1]), array([82, 35, 32,  1]), array([  3,  78, 145,   1]), array([133, 122,   2,   1]), array([135,  98,   2,   1]), array([145, 134,  23,   1]), array([113,  20,  78,   1]), array([ 73,  63, 123,   1]), array([96,  9, 71,  1]), array([106, 120,  13,   1]), array([136,  36,  83,   1]), array([59, 13,  5,  1]), array([44, 71, 36,  1]), array([134,   7,  59,   1]), array([ 7, 44, 49,  1]), array([44, 43, 25,  1]), array([135,  87,  90,   1]), array([ 75, 102,  42,   1]), array([ 87,  74, 120,   1]), array([ 59,  97, 139,   1]), array([111,  87,  96,   1]), array([  6,   4, 147,   1]), array([ 58,  92, 121,   1]), array([71, 84, 43,  1]), array([ 24, 141, 125,   1]), array([69, 15, 18,  1]), array([122,  63,  34,   1]), array([116, 131,  64,   1]), array([ 32, 144,  64,   1]), array([  0, 150, 101,   1]), array([ 23, 138,  19,   1]), array([124,  11, 106,   1]), array([58, 89, 13,  1]), array([ 82, 108,   9,   1]), array([ 89, 112,  93,   1]), array([ 86, 102,  86,   1]), array([ 17,  54, 141,   1]), array([18, 37,  5,  1]), array([108,  61,  77,   1]), array([  4, 115,  88,   1]), array([69, 94, 50,  1]), array([108, 143,  81,   1]), array([73, 90, 16,  1]), array([12,  4, 50,  1]), array([ 43, 116, 127,   1]), array([ 40, 142, 102,   1]), array([ 92, 102,  54,   1]), array([119,  90,  26,   1]), array([36, 18, 75,  1]), array([10,  3, 95,  1]), array([68, 84, 54,  1]), array([63, 24, 90,  1]), array([97, 70, 84,  1]), array([ 79, 114, 142,   1]), array([  8, 140,   8,   1]), array([135,  50,   9,   1]), array([130, 127, 124,   1]), array([149, 119,  91,   1]), array([150, 150, 116,   1]), array([ 52,  56, 145,   1]), array([104,  69,  73,   1]), array([ 54,  71, 109,   1]), array([ 53, 113,  49,   1]), array([112,  35,  11,   1]), array([ 50,  85, 110,   1]), array([ 21, 139,  76,   1]), array([122,  42,  16,   1]), array([39, 79, 27,  1]), array([50,  6, 56,  1]), array([ 67, 114, 107,   1]), array([136, 121,  55,   1]), array([34, 47, 76,  1]), array([145, 102, 134,   1]), array([ 54, 126, 147,   1]), array([ 53, 142,  38,   1]), array([132, 130, 150,   1]), array([ 77,  49, 145,   1]), array([36, 73, 53,  1]), array([76, 21, 94,  1]), array([144,  50, 127,   1]), array([147,  67,  93,   1]), array([104,  13,  15,   1]), array([ 77,  20, 124,   1]), array([ 36, 120, 111,   1]), array([149,  58,  61,   1]), array([133, 141,  44,   1]), array([144, 102, 141,   1]), array([ 68, 137, 128,   1]), array([110,  12,  61,   1]), array([57, 49,  8,  1]), array([112,  92,  46,   1]), array([  7, 140,  31,   1]), array([ 63, 123,  85,   1]), array([77, 19,  6,  1]), array([37, 35, 48,  1]), array([117, 105,  10,   1]), array([ 93, 113,  34,   1]), array([143, 150, 121,   1]), array([121,  36,  44,   1]), array([116,  36, 145,   1]), array([117, 112,  23,   1]), array([ 85, 100,  15,   1]), array([120,  28, 112,   1]), array([25, 41, 86,  1]), array([51, 25, 85,  1]), array([  8, 120,  40,   1]), array([ 19, 134,  15,   1]), array([48, 38, 80,  1]), array([39, 49, 96,  1]), array([ 44,  30, 122,   1]), array([ 59,  62, 146,   1]), array([ 9, 58, 39,  1]), array([27, 46, 66,  1]), array([148, 140,  39,   1]), array([131,  98, 133,   1]), array([ 53, 139,  58,   1]), array([40, 78, 59,  1]), array([59, 56,  4,  1]), array([ 56, 147, 120,   1]), array([ 98,  11, 138,   1]), array([76, 18, 17,  1]), array([ 18, 113, 146,   1]), array([39, 79, 17,  1]), array([99, 59, 62,  1]), array([ 39,  84, 108,   1]), array([40,  6, 89,  1]), array([ 11, 125,  32,   1]), array([112,  71,  28,   1]), array([83,  4, 61,  1]), array([ 8, 21, 10,  1]), array([ 22, 111,  46,   1]), array([ 74,  54, 111,   1]), array([63, 42, 14,  1]), array([97, 97, 75,  1]), array([16, 16, 77,  1]), array([42, 62, 43,  1]), array([  7,  13, 119,   1]), array([ 89, 149, 107,   1])]\n"
     ]
    }
   ],
   "source": [
    "list1 = []\n",
    "for i,j in index2:\n",
    "    if j !=3:\n",
    "        continue\n",
    "    list1.append(f[i])\n",
    "print(list1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 126,
   "metadata": {
    "collapsed": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[138,  15,  83,   1],\n",
       "       [132,   1,   0,   1],\n",
       "       [141, 114,   5,   1],\n",
       "       [133,  30,  21,   1],\n",
       "       [109,  41,  76,   1],\n",
       "       [ 28,   7,  79,   1],\n",
       "       [ 15,  58,   6,   1],\n",
       "       [ 62, 110,  11,   1],\n",
       "       [ 82,  35,  32,   1],\n",
       "       [  3,  78, 145,   1],\n",
       "       [133, 122,   2,   1],\n",
       "       [135,  98,   2,   1],\n",
       "       [145, 134,  23,   1],\n",
       "       [113,  20,  78,   1],\n",
       "       [ 73,  63, 123,   1],\n",
       "       [ 96,   9,  71,   1],\n",
       "       [106, 120,  13,   1],\n",
       "       [136,  36,  83,   1],\n",
       "       [ 59,  13,   5,   1],\n",
       "       [ 44,  71,  36,   1],\n",
       "       [134,   7,  59,   1],\n",
       "       [  7,  44,  49,   1],\n",
       "       [ 44,  43,  25,   1],\n",
       "       [135,  87,  90,   1],\n",
       "       [ 75, 102,  42,   1],\n",
       "       [ 87,  74, 120,   1],\n",
       "       [ 59,  97, 139,   1],\n",
       "       [111,  87,  96,   1],\n",
       "       [  6,   4, 147,   1],\n",
       "       [ 58,  92, 121,   1],\n",
       "       [ 71,  84,  43,   1],\n",
       "       [ 24, 141, 125,   1],\n",
       "       [ 69,  15,  18,   1],\n",
       "       [122,  63,  34,   1],\n",
       "       [116, 131,  64,   1],\n",
       "       [ 32, 144,  64,   1],\n",
       "       [  0, 150, 101,   1],\n",
       "       [ 23, 138,  19,   1],\n",
       "       [124,  11, 106,   1],\n",
       "       [ 58,  89,  13,   1],\n",
       "       [ 82, 108,   9,   1],\n",
       "       [ 89, 112,  93,   1],\n",
       "       [ 86, 102,  86,   1],\n",
       "       [ 17,  54, 141,   1],\n",
       "       [ 18,  37,   5,   1],\n",
       "       [108,  61,  77,   1],\n",
       "       [  4, 115,  88,   1],\n",
       "       [ 69,  94,  50,   1],\n",
       "       [108, 143,  81,   1],\n",
       "       [ 73,  90,  16,   1],\n",
       "       [ 12,   4,  50,   1],\n",
       "       [ 43, 116, 127,   1],\n",
       "       [ 40, 142, 102,   1],\n",
       "       [ 92, 102,  54,   1],\n",
       "       [119,  90,  26,   1],\n",
       "       [ 36,  18,  75,   1],\n",
       "       [ 10,   3,  95,   1],\n",
       "       [ 68,  84,  54,   1],\n",
       "       [ 63,  24,  90,   1],\n",
       "       [ 97,  70,  84,   1],\n",
       "       [ 79, 114, 142,   1],\n",
       "       [  8, 140,   8,   1],\n",
       "       [135,  50,   9,   1],\n",
       "       [130, 127, 124,   1],\n",
       "       [149, 119,  91,   1],\n",
       "       [150, 150, 116,   1],\n",
       "       [ 52,  56, 145,   1],\n",
       "       [104,  69,  73,   1],\n",
       "       [ 54,  71, 109,   1],\n",
       "       [ 53, 113,  49,   1],\n",
       "       [112,  35,  11,   1],\n",
       "       [ 50,  85, 110,   1],\n",
       "       [ 21, 139,  76,   1],\n",
       "       [122,  42,  16,   1],\n",
       "       [ 39,  79,  27,   1],\n",
       "       [ 50,   6,  56,   1],\n",
       "       [ 67, 114, 107,   1],\n",
       "       [136, 121,  55,   1],\n",
       "       [ 34,  47,  76,   1],\n",
       "       [145, 102, 134,   1],\n",
       "       [ 54, 126, 147,   1],\n",
       "       [ 53, 142,  38,   1],\n",
       "       [132, 130, 150,   1],\n",
       "       [ 77,  49, 145,   1],\n",
       "       [ 36,  73,  53,   1],\n",
       "       [ 76,  21,  94,   1],\n",
       "       [144,  50, 127,   1],\n",
       "       [147,  67,  93,   1],\n",
       "       [104,  13,  15,   1],\n",
       "       [ 77,  20, 124,   1],\n",
       "       [ 36, 120, 111,   1],\n",
       "       [149,  58,  61,   1],\n",
       "       [133, 141,  44,   1],\n",
       "       [144, 102, 141,   1],\n",
       "       [ 68, 137, 128,   1],\n",
       "       [110,  12,  61,   1],\n",
       "       [ 57,  49,   8,   1],\n",
       "       [112,  92,  46,   1],\n",
       "       [  7, 140,  31,   1],\n",
       "       [ 63, 123,  85,   1],\n",
       "       [ 77,  19,   6,   1],\n",
       "       [ 37,  35,  48,   1],\n",
       "       [117, 105,  10,   1],\n",
       "       [ 93, 113,  34,   1],\n",
       "       [143, 150, 121,   1],\n",
       "       [121,  36,  44,   1],\n",
       "       [116,  36, 145,   1],\n",
       "       [117, 112,  23,   1],\n",
       "       [ 85, 100,  15,   1],\n",
       "       [120,  28, 112,   1],\n",
       "       [ 25,  41,  86,   1],\n",
       "       [ 51,  25,  85,   1],\n",
       "       [  8, 120,  40,   1],\n",
       "       [ 19, 134,  15,   1],\n",
       "       [ 48,  38,  80,   1],\n",
       "       [ 39,  49,  96,   1],\n",
       "       [ 44,  30, 122,   1],\n",
       "       [ 59,  62, 146,   1],\n",
       "       [  9,  58,  39,   1],\n",
       "       [ 27,  46,  66,   1],\n",
       "       [148, 140,  39,   1],\n",
       "       [131,  98, 133,   1],\n",
       "       [ 53, 139,  58,   1],\n",
       "       [ 40,  78,  59,   1],\n",
       "       [ 59,  56,   4,   1],\n",
       "       [ 56, 147, 120,   1],\n",
       "       [ 98,  11, 138,   1],\n",
       "       [ 76,  18,  17,   1],\n",
       "       [ 18, 113, 146,   1],\n",
       "       [ 39,  79,  17,   1],\n",
       "       [ 99,  59,  62,   1],\n",
       "       [ 39,  84, 108,   1],\n",
       "       [ 40,   6,  89,   1],\n",
       "       [ 11, 125,  32,   1],\n",
       "       [112,  71,  28,   1],\n",
       "       [ 83,   4,  61,   1],\n",
       "       [  8,  21,  10,   1],\n",
       "       [ 22, 111,  46,   1],\n",
       "       [ 74,  54, 111,   1],\n",
       "       [ 63,  42,  14,   1],\n",
       "       [ 97,  97,  75,   1],\n",
       "       [ 16,  16,  77,   1],\n",
       "       [ 42,  62,  43,   1],\n",
       "       [  7,  13, 119,   1],\n",
       "       [ 89, 149, 107,   1]])"
      ]
     },
     "execution_count": 126,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "f = np.concatenate([list1[:],])\n",
    "f"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 127,
   "metadata": {
    "collapsed": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[138, 132, 141, 133, 109,  28,  15,  62,  82,   3, 133, 135, 145,\n",
       "        113,  73,  96, 106, 136,  59,  44, 134,   7,  44, 135,  75,  87,\n",
       "         59, 111,   6,  58,  71,  24,  69, 122, 116,  32,   0,  23, 124,\n",
       "         58,  82,  89,  86,  17,  18, 108,   4,  69, 108,  73,  12,  43,\n",
       "         40,  92, 119,  36,  10,  68,  63,  97,  79,   8, 135, 130, 149,\n",
       "        150,  52, 104,  54,  53, 112,  50,  21, 122,  39,  50,  67, 136,\n",
       "         34, 145,  54,  53, 132,  77,  36,  76, 144, 147, 104,  77,  36,\n",
       "        149, 133, 144,  68, 110,  57, 112,   7,  63,  77,  37, 117,  93,\n",
       "        143, 121, 116, 117,  85, 120,  25,  51,   8,  19,  48,  39,  44,\n",
       "         59,   9,  27, 148, 131,  53,  40,  59,  56,  98,  76,  18,  39,\n",
       "         99,  39,  40,  11, 112,  83,   8,  22,  74,  63,  97,  16,  42,\n",
       "          7,  89],\n",
       "       [ 15,   1, 114,  30,  41,   7,  58, 110,  35,  78, 122,  98, 134,\n",
       "         20,  63,   9, 120,  36,  13,  71,   7,  44,  43,  87, 102,  74,\n",
       "         97,  87,   4,  92,  84, 141,  15,  63, 131, 144, 150, 138,  11,\n",
       "         89, 108, 112, 102,  54,  37,  61, 115,  94, 143,  90,   4, 116,\n",
       "        142, 102,  90,  18,   3,  84,  24,  70, 114, 140,  50, 127, 119,\n",
       "        150,  56,  69,  71, 113,  35,  85, 139,  42,  79,   6, 114, 121,\n",
       "         47, 102, 126, 142, 130,  49,  73,  21,  50,  67,  13,  20, 120,\n",
       "         58, 141, 102, 137,  12,  49,  92, 140, 123,  19,  35, 105, 113,\n",
       "        150,  36,  36, 112, 100,  28,  41,  25, 120, 134,  38,  49,  30,\n",
       "         62,  58,  46, 140,  98, 139,  78,  56, 147,  11,  18, 113,  79,\n",
       "         59,  84,   6, 125,  71,   4,  21, 111,  54,  42,  97,  16,  62,\n",
       "         13, 149],\n",
       "       [ 83,   0,   5,  21,  76,  79,   6,  11,  32, 145,   2,   2,  23,\n",
       "         78, 123,  71,  13,  83,   5,  36,  59,  49,  25,  90,  42, 120,\n",
       "        139,  96, 147, 121,  43, 125,  18,  34,  64,  64, 101,  19, 106,\n",
       "         13,   9,  93,  86, 141,   5,  77,  88,  50,  81,  16,  50, 127,\n",
       "        102,  54,  26,  75,  95,  54,  90,  84, 142,   8,   9, 124,  91,\n",
       "        116, 145,  73, 109,  49,  11, 110,  76,  16,  27,  56, 107,  55,\n",
       "         76, 134, 147,  38, 150, 145,  53,  94, 127,  93,  15, 124, 111,\n",
       "         61,  44, 141, 128,  61,   8,  46,  31,  85,   6,  48,  10,  34,\n",
       "        121,  44, 145,  23,  15, 112,  86,  85,  40,  15,  80,  96, 122,\n",
       "        146,  39,  66,  39, 133,  58,  59,   4, 120, 138,  17, 146,  17,\n",
       "         62, 108,  89,  32,  28,  61,  10,  46, 111,  14,  75,  77,  43,\n",
       "        119, 107],\n",
       "       [  1,   1,   1,   1,   1,   1,   1,   1,   1,   1,   1,   1,   1,\n",
       "          1,   1,   1,   1,   1,   1,   1,   1,   1,   1,   1,   1,   1,\n",
       "          1,   1,   1,   1,   1,   1,   1,   1,   1,   1,   1,   1,   1,\n",
       "          1,   1,   1,   1,   1,   1,   1,   1,   1,   1,   1,   1,   1,\n",
       "          1,   1,   1,   1,   1,   1,   1,   1,   1,   1,   1,   1,   1,\n",
       "          1,   1,   1,   1,   1,   1,   1,   1,   1,   1,   1,   1,   1,\n",
       "          1,   1,   1,   1,   1,   1,   1,   1,   1,   1,   1,   1,   1,\n",
       "          1,   1,   1,   1,   1,   1,   1,   1,   1,   1,   1,   1,   1,\n",
       "          1,   1,   1,   1,   1,   1,   1,   1,   1,   1,   1,   1,   1,\n",
       "          1,   1,   1,   1,   1,   1,   1,   1,   1,   1,   1,   1,   1,\n",
       "          1,   1,   1,   1,   1,   1,   1,   1,   1,   1,   1,   1,   1,\n",
       "          1,   1]])"
      ]
     },
     "execution_count": 127,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "f1 = f.T\n",
    "f1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 128,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0"
      ]
     },
     "execution_count": 128,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.min(f1[0])#女生Python科目最小值"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 129,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "150"
      ]
     },
     "execution_count": 129,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.max(f1[0])#女生Python科目最大值"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 130,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "74.59310344827587"
      ]
     },
     "execution_count": 130,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.mean(f1[0])#女生Python科目均值"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 131,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "71.0"
      ]
     },
     "execution_count": 131,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.median(f1[0])#女生Python科目中位数"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 132,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "43.65989188413236"
      ]
     },
     "execution_count": 132,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.std(f1[0])#女生Python科目标准差"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 133,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "1"
      ]
     },
     "execution_count": 133,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.min(f1[1])#女生数学科目最小值"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 134,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "150"
      ]
     },
     "execution_count": 134,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.max(f1[1])#女生数学科目最大值"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 135,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "75.31724137931035"
      ]
     },
     "execution_count": 135,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.mean(f1[1])#女生数学科目均值"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 136,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "74.0"
      ]
     },
     "execution_count": 136,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.median(f1[1])#女生数学科目中位数"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 137,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "44.74212756001784"
      ]
     },
     "execution_count": 137,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.std(f1[1])#女生数学科目标准差"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 138,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0"
      ]
     },
     "execution_count": 138,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.min(f1[2])#女生语文科目最小值"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 139,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "150"
      ]
     },
     "execution_count": 139,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.max(f1[2])#女生语文科目最大值"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 140,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "69.33793103448276"
      ]
     },
     "execution_count": 140,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.mean(f1[2])#女生语文科目均值"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 141,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "66.0"
      ]
     },
     "execution_count": 141,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.median(f1[2])#女生语文科目中位数"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 142,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "44.46823285954161"
      ]
     },
     "execution_count": 142,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.std(f1[2])#女生语文科目标准差"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.0"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {},
   "toc_section_display": true,
   "toc_window_display": false
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
